package com.example.passport.mapper;

import com.example.common.dto.Pagination;
import com.example.passport.entity.Logging;
import com.example.passport.entity.Tenant;
import com.example.passport.entity.User;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface TenantMapper {

    @Select("<script>" +
            "SELECT * FROM `tenant` " +
            "where status !=" + User.STATUS_DELETE +
            "</script>")
    List<Tenant> findAll();



    @Select("<script>" +
            "SELECT * FROM `tenant` " +
            "where id = #{id} and status !=" + User.STATUS_DELETE +
            "</script>")
    Tenant findBytenantId(Long id);

}
